function start_server(){
    var name = document.getElementById("name").value;
    if(!name){
        console.error("name is empty");
        return;
    }
    
    createBattleSocket(name);
}

function createBattleSocket(name){
    var battleSocket = new BattleSocket(name);
    return bs = battleSocket;
}


$(function(){
    $('#name').attr('value','test1');
    
    log(createBattleSocket('test'));
});